package com.neusoft.elmboot.service;

import com.neusoft.elmboot.po.Wallet;
import com.neusoft.elmboot.po.WalletTransaction;

import java.math.BigDecimal;

public interface WalletService {
    Wallet getWalletByUserId(String userId);
    boolean recharge(String userId, BigDecimal amount, String rule);
    boolean withdraw(String userId, BigDecimal amount);
    boolean pay(String fromUserId, String toUserId, BigDecimal amount);
    boolean freeze(String userId, BigDecimal amount);
    boolean unfreeze(String userId, BigDecimal amount);
    boolean setCreditLimit(String userId, BigDecimal limit);
    boolean recordTransaction(WalletTransaction transaction);
    boolean confirmReceive(String userId, Integer orderId);
    WalletTransaction checkTransactionStatus(Integer orderId);
}